[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
A_RETRIEVE()
Return the value of a specified element of an array
-------------------------------------------------------------------------------
Syntax
A_RETRIEVE( <aTarget>,
<idxPos> ) -> expValue
Arguments
<aTarget> is the array to return a value from.
<idxPos> points to the element whose value is to be returned.
Returns
A_RETRIEVE() returns the value of the element in <aTarget> pointed
to by <idxPos>. The type of the value will always be the same
type as that of the array unless an error is encountered. In the
case of an error, the return value will be (.F.).
Description
A_RETRIEVE() is used to get the value of an element from a FlexFile
array.
Notes
. If a numeric value was stored as a double or float, the value
returned will be equivalent to the value stored, but if you display the
value without a PICTURE clause, it will show the number of decimals
according to the value of SET DECIMAL TO (which is not necesarily the
same number of decimals that were visable when the value that was
A_STORE()ed).
Examples
// Declare a two dimensional (UL)ong integer array
LOCAL rows, cols
rows = 10
cols = 20
auLong = A_DECLARE( "UL", rows, cols )
// Fill the 5th row with 100,000
A_FILL( auLong, 123456, A_(5, 1), cols )
// Multiply the value in the fifth row, fourth column
// by five and print the result.
? A_RETRIEVE( auLong, A_( 5, 4 ) ) * 5 // Result: 617280
See Also:
A_STORE()
A_TYPE()
A_DECLARE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson